package org.woozoo.xhtml.unittests.elementsuite.element
{
	import mx.utils.UIDUtil;
	
	import org.flexunit.asserts.assertTrue;
	import org.woozoo.xhtml.unittests.elementsuite.CaseBase;

	public class Case extends CaseBase
	{
		[Test(order=1)]
		public function testId() : void {
			assertTrue(element.id == "post-125C")
		}

		[Test(order=2)]
		public function testClassName() : void {
			assertTrue(element.className == "post-125 post hentry category-non-classe")
		}

		[Test(order=3)]
		public function testHasAttributeId() : void {
			assertTrue(element.hasAttribute('id') == true)
			UIDUtil
		}

		[Test(order=4)]
		public function testHasAttributeFoo() : void {
			assertTrue(element.hasAttribute('foo') == false)
		}

		[Test(order=5)]
		public function testInnerHTML() : void {
			assertTrue(elementSmall.innerHTML == "Wednesday, April 21st, 2010");
		}

		[Test(order=6)]
		public function testChildIndex() : void {
			assertTrue(elementSmall.childIndex == -1);
		}

		[Test(order=7)]
		public function testGetAttributeId() : void {
			assertTrue(element.att('id') == 'post-125C');
		}

		[Test(order=8)]
		public function testGetAttributeFoo() : void {
			assertTrue(element.att('foo') === "");
		}

		[Test(order=7)]
		public function testHasAttributeEqualTo() : void {
			assertTrue(element.hasAttributeEqualTo('id', 'post-125C'));
		}

		[Test(order=8)]
		public function testHasAttributeContains() : void {
			assertTrue(element.hasAttributeContains('id', 'st-12'));
		}

		[Test(order=9)]
		public function testHasAttributeStartWith() : void {
			assertTrue(element.hasAttributeStartWith('id', 'post'));
		}

		[Test(order=10)]
		public function testHasAttributeEndWith() : void {
			assertTrue(element.hasAttributeEndWith('id', '25C'));
		}

		[Test(order=11)]
		public function testNumChildren() : void {
			assertTrue(element.numChildren == 3);
		}

		[Test(order=12)]
		public function testChildren() : void {
			var children : Array = element.children;
			assertTrue(children.length == 3);
		}
	}
}